package pattern.singleton;

/**
 * <b>【懒汉式-方法同步】【可用，不推荐】</b><br>
 * Lazy Loading: 是 <br>
 * 线程安全: 是 <br>
 *
 * @Author: wangxiaonan
 * @Date: 2019/3/11
 **/
public class Singleton4 {

    private static Singleton4 INSTANCE;

    private Singleton4() {
    }

    public synchronized static Singleton4 getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new Singleton4();
        }
        return INSTANCE;
    }

}
